<?php
class HackerU_Session
{
	private static $instance = null;
	
	
	public static function getInstance()
	{
		if(self::$instance === null){
			self::$instance = new self();
		}
		return self::$instance;
	}
	
	private function __construct()
	{
		session_start();
	}
	
	public function __get($paramName)
	{
		return isset($_SESSION[$paramName]) ? $_SESSION[$paramName] : null;
	}
	
	public function __set($paramName, $paramVal)
	{
		$_SESSION[$paramName] = $paramVal;
	}
	
	public function destroy()
	{
		session_destroy();
	}
	
	public function __destruct()
	{
		unset($this);
	}
}